The present invention relates to a method and apparatus for functional test of a communication port, and particularly to a method and apparatus for testing a serial (COM) port to ensure that each pin is good and works well by signal interruption applied on the pins.
Computerized testing software and firmware are the major method for checking quality and performance of computer products by the manufacturers. A product of most common use is a commercial software program called "QA Factory" by Diagsoft. It has almost been a standard of quality and performance test for products of many manufacturers of computers. For the performance test of a serial port, the QA Factory utilizes a firmware connected to the serial port, and a testing software installed in a computer for transmitting signals to the firmware and the serial port and detecting the responsive signals in the pins of the serial port. The detected signals can be judged for the performance of the pins. But the tests of prior arts by traditional firmware and software are obviously insufficient. The software and firmware are only to detect the existence of the serial port and the address of the port, but not to verify if the port works well. The firmware cannot support test of the working performance either. Even in the test of QA Factory, only the second pin (RD), third pin (TD), fourth pin (DTR), sixth pin (DSR), seventh pin (RTS) and the eighth pin (CTS) are tested, but functions of the first pin (DCD) and the ninth pin (RI) are ignored. In the process of testing outer interruptions, the serial port are only tested by interruptions generated when receiving a full data and transmitting a full data, but not further tested by interruptions caused by signal changing in the pins of CTS, DCD, DSR and RI.
The primary object of the present invention is to provide a method for testing the performance of the CTS, DCD, DSR and RI pins of a serial port, and to solve the problems of prior arts which provide no test on the DCD and RI pins, and insufficient test on the CTS, DCD, DSR and RI pins.
The testing method of the present invention is to monitor the change of signals on the CTS and the DCD pins each time when a signal applied on the RTS pin is changed; and to monitor the change of signals on the CTS and RI pins each time when a signal applied on the DSR pin is changed. The testing method also provides testing data resembling to the CTS and DSR pins for testing outer interruption by varying signal levels through a firmware, and checks the interruption by changing signals on CTS, DCD, DSR and RI pins. Therefore, it is not only to detect the interruption caused by receiving a full data or transmitting a full data.